using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Fields
{
    /// <summary>
    /// <para>Enable Editor Tracking</para>
    /// <para>Enables editor tracking for a feature class, table, feature dataset, or relationship class in a geodatabase.</para>
    /// <para>启用地理数据库中要素类、表、要素数据集或关系类的编辑者追踪。</para>
    /// </summary>    
    [DisplayName("Enable Editor Tracking")]
    public class EnableEditorTracking : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnableEditorTracking()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>The feature class, table, feature dataset, or relationship class in which editor tracking will be enabled.</para>
        /// <para>将在其中启用编辑者追踪的要素类、表、要素数据集或关系类。</para>
        /// </param>
        public EnableEditorTracking(object _in_dataset)
        {
            this._in_dataset = _in_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Enable Editor Tracking";

        public override string CallName => "management.EnableEditorTracking";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_dataset, _creator_field, _creation_date_field, _last_editor_field, _last_edit_date_field, _add_fields.GetGPValue(), _record_dates_in.GetGPValue(), _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>The feature class, table, feature dataset, or relationship class in which editor tracking will be enabled.</para>
        /// <para>将在其中启用编辑者追踪的要素类、表、要素数据集或关系类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Creator Field</para>
        /// <para>The name of the field that will store the names of users who create features or records. If this field already exists, it must be a string field.</para>
        /// <para>将存储创建要素或记录的用户姓名的字段的名称。如果此字段已存在，则它必须是字符串字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Creator Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _creator_field { get; set; } = null;


        /// <summary>
        /// <para>Creation Date Field</para>
        /// <para>The name of the field that will store the date features or records are created. If this field already exists, it must be a date field.</para>
        /// <para>将存储要素或记录创建日期的字段的名称。如果此字段已存在，则它必须是日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Creation Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _creation_date_field { get; set; } = null;


        /// <summary>
        /// <para>Last Editor Field</para>
        /// <para>The name of the field that will store the names of users who last edited features or records. If this field already exists, it must be a string field.</para>
        /// <para>将存储上次编辑要素或记录的用户名称的字段的名称。如果此字段已存在，则它必须是字符串字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Last Editor Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _last_editor_field { get; set; } = null;


        /// <summary>
        /// <para>Last Edit Date Field</para>
        /// <para>The name of the field that will store the date features or records were last edited. If this field already exists, it must be a date field.</para>
        /// <para>将存储上次编辑要素或记录的日期的字段的名称。如果此字段已存在，则它必须是日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Last Edit Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _last_edit_date_field { get; set; } = null;


        /// <summary>
        /// <para>Add fields</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to add fields if they don't exist.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Fields will not be added. Fields specified must already exist in the input dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Fields will be added if they do not exist. You must specify the names of the fields to add in the Creator Field, Creation Date Field, Last Editor Field, and Last Edit Date Field parameters.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否添加字段（如果字段不存在）。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会添加字段。指定的字段必须已存在于输入数据集中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果字段不存在，则将添加这些字段。您必须在“创建者字段”、“创建日期”字段、“上次编辑者”字段和“上次编辑日期字段”参数中指定要添加的字段的名称。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Add fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _add_fields_value _add_fields { get; set; } = _add_fields_value._false;

        public enum _add_fields_value
        {
            /// <summary>
            /// <para>ADD_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ADD_FIELDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ADD_FIELDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ADD_FIELDS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Record Dates in</para>
        /// <para><xdoc>
        ///   <para>The time format in which created date and last edited date will be recorded. The default is UTC.</para>
        ///   <bulletList>
        ///     <bullet_item>UTC (Coordinated Universal Time)—Dates will be recorded in UTC. This is the default.</bullet_item><para/>
        ///     <bullet_item>Time zone of database—Dates will be recorded in the time zone in which the database is located.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>记录创建日期和上次编辑日期的时间格式。默认值为 UTC。</para>
        ///   <bulletList>
        ///     <bullet_item>UTC（协调世界时）—日期将以 UTC 格式记录。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>数据库时区 - 日期将记录在数据库所在的时区。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Record Dates in")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _record_dates_in_value _record_dates_in { get; set; } = _record_dates_in_value._UTC;

        public enum _record_dates_in_value
        {
            /// <summary>
            /// <para>UTC (Coordinated Universal Time)</para>
            /// <para>UTC (Coordinated Universal Time)—Dates will be recorded in UTC. This is the default.</para>
            /// <para>UTC（协调世界时）—日期将以 UTC 格式记录。这是默认设置。</para>
            /// </summary>
            [Description("UTC (Coordinated Universal Time)")]
            [GPEnumValue("UTC")]
            _UTC,

            /// <summary>
            /// <para>Time zone of database</para>
            /// <para>Time zone of database—Dates will be recorded in the time zone in which the database is located.</para>
            /// <para>数据库时区 - 日期将记录在数据库所在的时区。</para>
            /// </summary>
            [Description("Time zone of database")]
            [GPEnumValue("DATABASE_TIME")]
            _DATABASE_TIME,

        }

        /// <summary>
        /// <para>Modified Input Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Modified Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public EnableEditorTracking SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}